Generating descriptions of matching resources based on the kind, quality, and relevance of the available sources of information about the matching resources

ABSTRACT

Techniques are provided for generating descriptions of matching resources in a manner that takes into account the kind, quality, and relevance of the available sources of information about the matching resources. For example, after the search engine identifies matching resources based on the query terms, the search engine determines the kinds of available sources of information about each matching resource. For each matching resource, based on the kinds of available sources of information about the matching resource, one of a plurality of processes is selected to generate a description for the matching resource. Using the content-sensitive description generation techniques described herein, a single result set may include abstracts that were generated using several different processes, where the difference in process corresponds to a difference in the kind, quality, and relevance of the available sources of information about each matching resource.

CLAIM OF PRIORITY

This application claims priority, as a continuation application, to U.S.patent application Ser. No. 14/294,515, filed Jun. 3, 2014, under 35U.S.C. §120, which is a continuation of U.S. Pat. No. 8,745,044 B2,issued on Jun. 3, 2014, which is a divisional of U.S. Pat. No. 7,406,458B1, issued on Jul. 29, 2008, which claims the benefit of U.S.Provisional Patent Application No. 60/411,533, filed Sep. 17, 2002, theentire contents of which are hereby incorporated by reference as iffully set forth herein. The applicant(s) hereby rescind any disclaimerof claim scope in the parent application(s) or the prosecution historythereof and advise the USPTO that the claims in this application may bebroader than any claim in the parent application(s).

FIELD OF THE INVENTION

The present invention relates to search engines, and in particular, togenerating descriptions of resources based on the context in whichsearch query terms are used within those resources.

BACKGROUND OF THE INVENTION

A search engine is a computer program that helps a user to locateinformation. To locate information on a particular topic, a user cansubmit to a search engine one or more search query terms related to thetopic. In response, the search engine executes the search query andgenerates information about the results of the search. The informationabout the results of the search, referred to herein as the “searchresults”, usually contains a list of the resources that satisfy thesearch query. The resources identified in the search results arereferred to herein as “matching resources”.

While search engines may be applied in a variety of contexts, searchengines are especially useful for locating resources that are accessiblethrough the Internet. Resources may include files whose content iscomposed in a page description language such as Hypertext MarkupLanguage (HTML). Such files are typically called pages. Using a webbrowser, pages may be retrieved by selecting HTML links that contain theUniversal Resource Locators (URLs) of the pages.

Depending on the query terms used and the number of pages that containthose query terms, search results may contain so many matching resourcesthat a user may be overwhelmed when trying to determine which matchingresources to investigate further. To assist a user in selecting one ormore matching resources from a list, the search results may include ashort description, or abstract, for each matching resource. By readingthe abstract for a given matching resource, a user should be able tobetter determine whether the matching resource merits furtherinvestigation. Abstracts should be relatively short, so that a user mayquickly judge the relevance of matching resources listed in the searchresults.

Unfortunately, abstracts that are displayed by existing search enginesfrequently fail to provide a user with the most useful information thatis contained on a page. The search results generated by existing searchengines typically include abstracts that have been generated based onthe words that are contained in the matching documents, but withouttaking into account the kind, quality, or relevance of the varioussources of information about the matching documents.

For example, if a user submits a search query for “Chinese food”, somematching resources may contain information about restaurants, and somematching resources may contain information about cookbooks. A particularmatching resource may be associated with multiple sources of informationabout that particular matching resource. For example, one matchingresource that contains information about a restaurant might beassociated with a database that contains a telephone number and/or anaddress of the restaurant, and another matching resource that containsinformation about a restaurant might not be associated with such adatabase. One matching resource that contains information about acookbook might be associated with a database that contains a price of,and/or a number of pages in, the cookbook, and another matching resourcethat contains information about a cookbook might not be associated withsuch a database. Existing search engines usually do not account for thisdifference in available sources of information about matching resources.Rather, the process that existing search engines use to generateabstracts for pages about restaurants is usually the same process thatexisting search engines use to generate abstracts for pages aboutcookbooks, regardless of the differences in available sources ofinformation about the pages. As a result, existing search enginesdisplay abstracts that often fail to capture the most useful informationthat is contained in the matching resources that the abstracts describe.

The approaches described in this section are approaches that could bepursued, but not necessarily approaches that have been previouslyconceived or pursued. Therefore, unless otherwise indicated, it shouldnot be assumed that any of the approaches described in this sectionqualify as prior art merely by virtue of their inclusion in thissection.

SUMMARY OF THE INVENTION

Techniques are provided for generating descriptions of matchingresources in a manner that takes into account the kind, quality, andrelevance of the available sources of information about the matchingresources. For example, after the search engine identifies matchingresources based on the query terms, the search engine determines thekinds of available sources of information about each matching resource.For each matching resource, based on the kinds of available sources ofinformation about the matching resource, one of a plurality of processesis selected to generate a description for the matching resource. Thus,one process may be selected to generate a description for one matchingresource, and another process may be selected to generate a descriptionfor another matching resource. Using the content-sensitive descriptiongeneration techniques described herein, a single result set may includeabstracts that were generated using several different processes, wherethe difference in process corresponds to a difference in the kind,quality, and relevance of the available sources of information abouteach matching resource.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by wayof limitation, in the figures of the accompanying drawings and in whichlike reference numerals refer to similar elements and in which:

FIG. 1 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for generating descriptions ofmatching resources based on the kind, quality, and relevance of theavailable sources of information about the matching resources;

FIG. 2 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for generating an abstract based ona contextual abstract and a static abstract;

FIG. 3 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for composing a static abstract anda contextual abstract into a composite abstract;

FIG. 4 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for generating a contextualabstract; and

FIG. 5 is a block diagram that illustrates a computer system 500 uponwhich an embodiment of the invention may be implemented.

DETAILED DESCRIPTION OF THE INVENTION

Techniques for generating descriptions of matching resources based onthe kind, quality, and relevance of the available sources of informationabout the matching resources are described. In the followingdescription, for the purposes of explanation, numerous specific detailsare set forth in order to provide a thorough understanding of thepresent invention. It will be apparent, however, that the presentinvention may be practiced without these specific details. In otherinstances, well-known structures and devices are shown in block diagramform in order to avoid unnecessarily obscuring the present invention.

Functional Overview

When a search engine selects matching resources based on query termsthat were submitted to the search engine, the kind, quality, andrelevance of the available sources of information about some matchingresources may differ from the kind, quality, and relevance of theavailable sources of information about other matching resources. Inother words, even though all of the matching resources were selectedbased on the same query terms (e.g., “Chinese food”), the kind, quality,and relevance of the available sources of information about each of thematching resources may differ.

The most useful information that is contained in a page is likely todepend on the kind, quality, and relevance of the available sources ofinformation about that page. An abstract that describes a particularpage should contain as much of the most useful information that iscontained in available sources of information about the page as possiblewhile staying within a reasonable length. Therefore, given a pluralityof processes that may be used to generate or select an abstract for apage in different ways, the process that is selected to generate orselect an abstract for the page should be customized for the kind,quality, and relevance of the available sources of information about thepage. Some such sources may be contained within the page itself, andother such sources, such as databases, may be external to the page.

FIG. 1 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for generating descriptions ofmatching resources based on the kind, quality, and relevance of theavailable sources of information about the matching resources. In block102, one or more query terms are received. For example, a search enginemay receive the query terms “Chinese food” from a user.

In block 104, based on the query terms, matching resources aredetermined. For example, a search engine may search a collection ofpages for pages that contain the query terms “Chinese food” and, basedon the search, select several pages from among the plurality of pages.

In block 106, for each particular matching resource, based on one ormore kinds of sources of available information about the particularmatching resource, a process is selected, from among a plurality ofprocesses. For each particular matching resource, the selected process,when performed, will generate or select a description, or abstract, forthe particular matching resource. The process selected for one matchingresource may be the same as or different than a process selected foranother matching resource. For example, if a search engine determinesthat a particular page contains a brief description that seems to havebeen generated by a person, then the search engine may select, fromamong a plurality of processes that select or generate abstracts, aprocess that attempts to generate an abstract that contains that briefdescription. Brief descriptions generated by people are likely tocontain the most useful information about a page. If such a descriptionis unavailable, then the search engine may select a process thatattempts to generate an abstract based on some other source of availableinformation about the page. Thus, one kind of source of information is abrief description that seems, according to specified criteria, to havebeen generated by a person. Other kinds of sources of information may besources that seem to have not been generated by a person. For example,other kinds of sources of information may be sources that seem,according to specified criteria, to have been generated by a computer.

Because sources of available information about matching resources maydiffer from matching resource to matching resource, the process selectedfor each matching resource may differ.

Once abstracts have been selected or generated according to the abovetechnique for each matching resource in the search results, theabstracts may be displayed to a user that entered the query terms. Thus,a search engine may display abstracts that are more likely to capturethe most useful information that is contained in or associated with theresources that the abstracts describe.

Static Abstracts and Contextual Abstracts

As is described above, different processes may be used to generateabstracts for matching resources. Among the kinds of abstracts that aparticular process may generate or select are static abstracts andcontextual abstracts. A static abstract is an abstract whose content isnot dictated by search terms. A contextual abstract, on the other hand,is an abstract whose content is dictated, at least in part, by searchterms.

In a system where the technique for generating an abstract may change ona resource-to-resource basis based on the content of the resources, afirst process may be configured to generate or select a static abstractfor one matching resource, and a second process may be configured togenerate or select a contextual abstract for another matching resource,even if both matching resources are obtained using the same query terms.Static abstracts and contextual abstracts are described below.

Static abstracts are generated without regard to query terms entered bya user. Each page may be associated with a static abstract for thatpage. While a static abstract for one page typically differs from astatic abstract for another page, a static abstract for a particularpage typically does not change due to query terms (although any queryterms that happen to occur within a static abstract may be automaticallyemphasized when the static abstract is presented to a user). Therefore,static abstracts may be generated in advance of a search engine'sreceipt of query terms. Static abstracts may be manually generated by ahuman author or automatically generated by a computer program.

The content of a static abstract may be obtained from one or morespecified fields of a page. For example, HTML defines fields such as atitle field and a meta field. Some or all of the text within thesefields may be placed within a static abstract for the page that containsthe fields.

The content of a static abstract may be generated according to somealgorithm that extracts text from a page. For example, an algorithm mayplace the first N words of a page within a static abstract for thatpage, regardless of whether the first N words contain any query termsthat might be received from a user.

Unlike static abstracts, contextual abstracts may be generated orselected based on the specific query terms that are entered by a user.Therefore, multiple contextual abstracts may be associated with aparticular page, where the specific contextual abstract that is used torepresent the page in the search results is based on the terms in thequery for which the search results are being generated. A contextualabstract may include, among other things, phrases extracted from theportion of the matching resource that contains the query terms. Thus, acontextual abstract may describe the content of a particular page in thecontext of the query terms. A technique for generating a contextualabstract is provided below in the section entitled “GENERATING ACONTEXTUAL ABSTRACT”.

In some cases, a contextual abstract may be more likely than a staticabstract to contain the most useful information that is contained in apage. In other cases, such as when a static abstract is manuallyauthored by a human being, a static abstract may be more likely than acontextual abstract to contain the most useful information that iscontained in a page. In yet other cases, the most useful informationthat is contained in a page is most likely to be found in an abstractthat is a composite of a static abstract and a contextual abstract forthe page. A technique for generating an abstract based on a staticabstract and a contextual abstract is described below.

Generating an Abstract Based on Contextual and Static Abstracts

FIG. 2 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for generating an abstract based ona contextual abstract and a static abstract. In some cases, thegenerated abstract may consist entirely of a static abstract. In somecases, the generated abstract may consist entirely of a contextualabstract. In some cases, the generated abstract may contain parts of astatic abstract and parts of a contextual abstract. The generatedabstract may be referred to as a “intelligent” abstract. While two textstrings are described below for sake of simple illustration, embodimentsare not limited to two text strings. Some embodiments may generate anabstract based on more than two text strings and combinations thereof.

In block 202, a first score is associated with a first text string thatis based on one or more query terms. For example, a search engine mayassociate a score with a contextual abstract for a particular page. Atechnique for determining a score for an abstract is described below inthe section entitled “DETERMINING A SCORE FOR AN ABSTRACT”.

In block 204, a second score is associated with a second text stringthat is not based on the query terms. For example, a search engine mayassociate a score with a static abstract for the particular page.

In block 206, either the first text string, the second text string, or astring that contains at least parts of the first text string and thesecond text string is selected based on the first score and the secondscore. For example, a search engine may compare a score for a staticabstract with a score for a contextual abstract, and, based on thecomparison, generate an abstract that consists entirely of either thestatic abstract or the contextual abstract, or contains parts of boththe static abstract and the contextual abstract.

An abstract that contains parts of both a static abstract and acontextual abstract may be referred to as a “composite” abstract. Atechnique for generating a composite abstract is described below in thesection entitled “COMPOSING A STATIC ABSTRACT AND A CONTEXTUAL ABSTRACTINTO A COMPOSITE ABSTRACT”.

In one embodiment, the first text string is a static abstract, and thesecond string is a contextual abstract. In one embodiment, if the scorethat is associated with the static abstract is greater than a firstspecified threshold, and if the score that is associated with thecontextual abstract is greater than a second specified threshold, then acomposite abstract is selected to be the intelligent abstract.

In one embodiment, if the score that is associated with the staticabstract is greater than the first specified threshold, and if the scorethat is associated with the contextual abstract is not greater than thesecond specified threshold, then the static abstract is selected to bethe intelligent abstract.

In one embodiment, if the score that is associated with the staticabstract is not greater than the first specified threshold, and if thescore that is associated with the contextual abstract is greater thanthe sum of a specified number and the score that is associated with thestatic abstract, then the contextual abstract is selected to be theintelligent abstract.

In one embodiment, if the score that is associated with the staticabstract is not greater than the first specified threshold, and if thescore that is associated with the contextual abstract is not greaterthan the sum of the specified number and the score that is associatedwith the static abstract, and if the score that is associated with thecontextual abstract is greater than a third specified threshold, then acomposite abstract is selected to be the intelligent abstract.

In one embodiment, if the score that is associated with the staticabstract is not greater than the first specified threshold, and if thescore that is associated with the contextual abstract is not greaterthan the sum of the specified number and the score that is associatedwith the static abstract, and if the score that is associated with thecontextual abstract is not greater than the third specified threshold,then the static abstract is selected to be the intelligent abstract.

In one embodiment, any specified thresholds or numbers described hereinmay be determined by examining results that are produced when suchspecified thresholds or numbers are set to particular values, and thenby examining other results that are produced when such specifiedthresholds or numbers are set to different particular values. Based onthe differences between the results produces given different values,optimum settings for specified thresholds and numbers may be determined.

Determining a Score for an Abstract

The score associated with a static abstract should be an indicator ofthe probability that the static abstract was manually, and notautomatically, generated. Manually generated static abstracts oftencontain the most useful information that is contained in a page. Thus,in one embodiment, the criteria used to associate a score with anabstract are selected to maximize scores that are associated withmanually generated abstracts. In various embodiments, one or more of thefactors described below may be used, separately or in combination, toassociate a score with an abstract. In one embodiment, all of thefactors described below are combined to associate a score with anabstract.

The score that is associated with a static abstract may be based onwhether the static abstract contains fewer than a specified number ofcharacters. For example, a lower score may be associated with a staticabstract that contains at least 200 characters, and a higher score maybe associated with a static abstract that contains less than 200characters.

The score that is associated with a static abstract may be based onwhether the static abstract ends with punctuation, such as a period,question mark, or exclamation point. For example, a higher score may beassociated with a static abstract that ends with a period, and a lowerscore may be associated with a static abstract that ends with analphanumeric character.

The score that is associated with a static abstract may be based on thepercentage of the query terms that are contained in the static abstract.For example, a higher score may be associated with a static abstractthat contains 75% of the query terms, and a lower score may beassociated with a static abstract that contains only 25% of the queryterms.

The score that is associated with a contextual abstract may be based onthe percentage of the query terms that are contained within a singleexcerpt of the contextual abstract. Excerpts are described below in thesection entitled “GENERATING A CONTEXTUAL ABSTRACT”. For example, ahigher score may be associated with a contextual abstract that containsan excerpt that contains 75% of the query terms, and a lower score maybe associated with a contextual abstract that contains no excerpt thatcontains more than 25% of the query terms.

The score that is associated with an abstract (static or contextual) maybe based on how many times a query term appears in the abstract. Forexample, a higher score may be associated with an abstract that containsten instances of a query term, and a lower score may be associated withan abstract that contains only one instance of a query term.

The score that is associated with an abstract (static or contextual) maybe based on how many times a specified character occurs in the abstract.For example, a higher score may be associated with an abstract thatcontains only one instance of a slash or backslash character, and alower score may be associated with an abstract that contains teninstances of a slash or backslash character.

The occurrence of some specified characters within an abstract mayaffect the score for that abstract more than the occurrence of otherspecified characters within an abstract. For example, the presence of“adjacency” characters in an abstract may lower a score for thatabstract more than the presence of “space” characters in that abstract.Both “adjacency” and “space” characters are described below in thesection entitled “MATCHING COMPOUND WORDS TO MULTIPLE WORDS.”

The score that is associated with a contextual abstract may be based onthe number of excerpts in the contextual abstract. For example, a higherscore may be associated with a contextual abstract that contains onlytwo excerpts, and a lower score may be associated with a contextualabstract that contains seven excerpts.

The score that is associated with an abstract (static or contextual) maybe based on the proximity of the query terms that occur within theabstract. For example, a higher score may be associated with an abstractin which query terms occur in close proximity to each other, and a lowerscore may be associated with an abstract in which query terms occur indistant proximity to each other.

The score that is associated with an abstract (static or contextual) maybe based on the percentage of characters in the abstract that areuppercase, lowercase, numeric, or other types of characters. Forexample, a higher score may be associated with an abstract in which thenumber of uppercase characters divided by the number of uppercase andlowercase characters is not greater than 0.2, and a lower score may beassociated with an abstract in which the number of uppercase charactersdivided by the number of uppercase and lowercase characters is greaterthan 0.2.

The score that is associated with an abstract (static or contextual) maybe based on the number of words in the query. For example, a higherscore may be associated with a contextual abstract, and a lower scoremay be associated with a static abstract, when there are many, ratherthan few, words in the query. As the number of words in a queryincreases, the score associated with a contextual abstract may increaseaccordingly, and the score associated with a static abstract maydecrease accordingly.

The score that is associated with an abstract (static or contextual) maybe based on other factors as well, such as the number of matchingresources that result from the query, and/or the distribution of therelevance scores associated with such matching resources.

Composing a Static Abstract and a Contextual Abstract into a CompositeAbstract

Often, a search engine is configured to display search results in whicha title of each particular matching resource is listed with an abstractof the particular matching resource. Ideally, phrases in the title of amatching resource should not be duplicated in the abstract of thematching resource.

FIG. 3 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for composing a static abstract anda contextual abstract into a composite abstract. To simplifyexplanation, the technique is described with reference to two data sets.A first data set contains a first set of text strings and a title. Asecond data set contains a second set of text strings and the sametitle.

For example, the first set of text strings may contain one or more“first set” text strings that are in a static abstract that isassociated with a particular page. The second set of text strings maycontain one or more “second set” text strings that are in a contextualabstract that is associated with the same page. In one embodiment, each“first set” text string is a separate “excerpt” of a static abstract,and each “second set” text string is a separate “excerpt” of acontextual abstract. Excerpts are described below in the sectionentitled “GENERATING A CONTEXTUAL ABSTRACT”. The title may be the titleof the same page, and may be extracted from an HTML title field that iscontained in the page.

In block 302, based on a proportion of words that are contained in botha “second set” text string and the first data set relative to words thatare contained in the “second set” text string but not in the first dataset, it is determined whether to remove the “second set” text stringfrom the second set of text strings. For example, for each excerpt in acontextual abstract of a page, a search engine may determine apercentage of the words in the excerpt that are also contained in eitherthe title of the page or the static abstract of the page. If thepercentage is greater than a specified threshold, then the excerpt maybe removed from the contextual abstract for composition purposes. Inthis manner, the contextual abstract may be “pared down” to what islikely the non-redundant information contained therein before it iscombined with a part of the static abstract.

In block 304, based on a proportion of words that are contained in botha “first set” text string and the second data set relative to words thatare contained in the “first set” text string but not in the second dataset, it is determined whether to remove the “first set” text string fromthe first set of text strings. For example, for each text string in astatic abstract of a page, a search engine may determine a percentage ofthe words in the text string that are also contained in either the titleof the page or the contextual abstract of the page. If the percentage isgreater than a specified threshold, then the text string may be removedfrom the static abstract for composition purposes. In this manner, thestatic abstract may be “pared down” to what is likely the non-redundantinformation contained therein before it is combined with a part of thecontextual abstract.

In one embodiment, the determination described above with reference toblock 304 is not performed for each text string in a static abstract ofa page. Instead, in one embodiment, it is determined whether to removethe last text string of the static abstract. If the last text string isremoved, then the next-to-last text string becomes the last text string,and the determination is repeated for that text string. In this manner,last text strings may be repetitively removed from the static abstractuntil it is determined that the last text string should not be removed,or until the static abstract contains a specified minimum number of textstrings.

In block 306, the first set of text strings is combined with the secondset of text strings. For example, a search engine may append theremainder of the “pared down” contextual abstract to the remainder ofthe “pared down” static abstract to produce a composite abstract. In oneembodiment, the remainder of the contextual abstract is appended to theremainder of the static abstract with an ellipsis (“ . . . ”) insertedbetween the two.

In one embodiment, if a composite abstract is generated, then any partof a contextual abstract that is also contained in a static abstract isremoved from either the contextual abstract or the static abstract forcomposition purposes. As a result, even if a contextual abstractoverlaps a static abstract in a source, the overlapping part will notoccur twice in the composite abstract.

Generating a Contextual Abstract

As is stated above, a contextual abstract for a page may be generatedbased on one or more query terms that are received as input from a user.FIG. 4 is a flow diagram that illustrates a technique, according to anembodiment of the present invention, for generating a contextualabstract. In block 402, one or more query terms are received. Forexample, a search engine may receive one or more query terms from auser.

In block 404, one or more text strings, each of which contains at leastone of the query terms, are found within data. For example, a searchengine may find, within a filtered and formatted derivative of a pagecalled a “digest,” one or more text strings, each of which contains atleast one of the query terms. A technique for generating a digest isdescribed below in the section entitled “GENERATING A DIGEST FOR APAGE”.

Each of the text strings may be called an “excerpt”. In one embodiment,each excerpt (a) contains at least one query term, (b) does not containfewer than M words, where M is a specified minimum word count, and (c)does not contain more than N words, where N is a specified maximum wordcount. In one embodiment, all of the excerpts that exist within thedigest are found. An excerpt contains words that are contiguous withinthe digest. In another embodiment, only some of the excerpts that existwithin the digest are found.

A query term that is submitted by a user may contain multiple words thatare separated by characters that are not spaces, such as hyphens orperiods. The same words may occur in the digest, but separated by spacesinstead of the other character(s). Conversely, a user may submitmultiple words, separated by spaces, as query terms. The same words mayoccur in the digest, but separated by characters that are not spaces.Words that are separated by certain specified characters may be referredto as “compound” words. In finding each text string that contains atleast one query term, compound words should be considered. A techniquefor determining whether a compound query term matches multiple words ina digest, or whether multiple query terms match a compound word in adigest, is described below in the section entitled “MATCHING COMPOUNDWORDS TO MULTIPLE WORDS”.

In block 406, a score is associated with each of the text strings. Ascore that is associated with one text string may be different than ascore that is associated with another text string. Each of the scores isbased on a weight that is associated with a section of the data in whichat least a part of the text string is located.

For example, if data (such as a digest of a page) consists of first,second, and third sections that are associated with a first, second, andthird weight, respectively, and if a text string is completely containedwithin the third section, then the search engine may associate, with thetext string, a score that is based on the third weight. If a text stringis partially located in the first section and partially located in thesecond section, then a search engine may associate, with the textstring, a score that is based on the greater of the first and secondweights.

A score for a text string may be based on the number of words in thetext string, the number of words in the text string that are queryterms, and/or the number of distinct query terms that occur in the textstring (not counting a particular query term more than once if it occurswithin the text string more than once).

Additionally or alternatively, a score for a text string may be based ona number of sentences and/or sections in which the text string is atleast partially contained. Because complete sentences or ideas aretypically better abstract material than incomplete sentences or ideas,an text string that spans a large number of sections and/or sentencesmay be associated with a lower score than an text string that iscontained within a small number of sections and/or sentences.

In one embodiment, a score for a text string may be based on acombination of some or all of the above factors and other factors. Thus,a particular score may be based upon a combination of factors.

In block 408, one or more of the text strings are selected based onscores that are associated with the text strings. For example, a searchengine may select a specified number of the text strings that have thehighest scores. The search engine may append the selected text stringstogether to form a contextual abstract for the page from which thedigest was generated.

In one embodiment, text strings are selected one-at-a-time. In oneembodiment, if, after a text string is selected, the number of currentlyselected text strings is less than a specified number then the remainingtext strings are associated with new and potentially different scoresthat account for the text strings that have already been selected. Inone embodiment, a score for a text string is based on the number ofdistinct query terms that occur in the text string but do not occur inany other text string that has already been selected. Therefore, when atext string is selected, scores for the remaining unselected textstrings may change. The changed scores may be used in further textstring selection. Repetitively scoring and selecting text strings inthis manner promotes the likelihood that an abstract will contain atleast one occurrence of each query term.

In one embodiment, each selected text string is extended to contain atleast N words, where N is a specified number. In one embodiment, a textstring is extended by alternately adding, to the left and right sides ofthe text string, words that occur on the corresponding left and rightsides of the text string in the digest, until the text string hasattained enough words to satisfy a minimum word count requirement. If,through extension, a text string becomes adjacent to another text stringas those text strings occur in the digest, then the adjacent textstrings are merged to form one text string.

Typically, in a digest, words that are separated from a text string by asection break or sentence break are not strongly related to query terms.Therefore, in one embodiment, a word from the left or right side is notadded to the text string if a sentence break or section break occurs inthe digest between the text string and the word, unless the text stringis bounded on both sides by breaks. In other words, if, in the digest,the text string is bounded on only one side by a section break orsentence break, then words are added only to the opposite side of thetext string until the opposite side also becomes bounded by a sectionbreak or sentence break. If both sides of a text string are bounded by abreak and the text string contains less than the specified minimumnumber of words, then words are added to alternating sides of the textstring just as if the breaks were not present.

In one embodiment, a selected text string is not extended, even if theselected text string contains fewer words than a specified minimumexcerpt word count, if adding a word to the text string would cause atotal number of words in all of the selected text strings to exceed amaximum abstract word count. By limiting a total number of words thatmay be contained in the combined selected text strings, a contextualabstract generator enables a user to quickly decide whether toinvestigate a resource that is associated with an abstract that containsthe selected text strings.

In one embodiment, the selected—and in one embodiment, extended—textstrings are appended together with ellipses inserted to separate eachtext string and indicate that the page contains text that is notcontained in the abstract. In one embodiment, query terms in the textstrings are emphasized. For example, query terms that occur in theappended text strings may be presented in a bold or otherwisehighlighted font, thereby causing the query terms to be distinguishedfrom the remainder of the appended text strings. The result of thetechnique described above is a contextual abstract.

Generating a Digest for a Page

A search engine may search an index of pages that have previously beendiscovered on the Internet by a computer program called a “crawler”.Once a crawler has discovered a page, a digest may be automaticallycreated for that page. The digest contains the text that is containedwithin the page. Other content that is contained within the page, suchas image and script content, may be omitted from the digest. The digestis divided into sentences and sections by sentence break symbols andsection break symbols, respectively.

Sentence break symbols are placed between sentences that are identifiedin the text of the page. Sentences may be identified by sentence-endingpunctuation characters, such as the period, the question mark, and theexclamation point. In one embodiment, sentence break symbols are alsoplaced where certain specified sentence delimiters, such as HTML anchorand image tags, are located in the HTML text of the page. In oneembodiment, section break symbols are placed where certain specifiedsection delimiters, such as HTML paragraph, table, and list tags, arelocated in the HTML text of the page. In one embodiment, HTML tags thatare neither sentence delimiters nor section delimiters are replaced bywhite space in the digest.

Once a digest has been divided into sections, a weight is automaticallyassociated with each section. Each section may be associated with adifferent weight. In one embodiment, the weight that is associated witha particular section is based on a percentage of characters within thatsection that are not contained within link text. Link text is text that,when represented by a page viewing application such as an Internetbrowser, acts as a selectable link to another page or resource or adifferent location within the page. HTML anchor text is one example oflink text.

The greater the percentage of a section's characters that are notcontained in link text, the higher the weight for that section will be.A section's weight is an indicator of how likely it is that the textwithin the section accurately represents the overall content of the pagein which the text is contained. Link text typically does not accuratelyrepresent the overall content of the page in which it is contained.

Matching Compound Words to Multiple Words

As is stated above, words that are separated by certain specifiedcharacters may be referred to as “compound” words. In one embodiment,words that are separated only by a single quote (or apostrophe), adouble quote, a forward slash, a backward slash, a colon, an ampersand,a plus sign, a hyphen, an underscore, an at sign, or a period areconsidered to be a single compound word. A character that separates thewords in a compound word may be referred to as an “adjacency” character.Words that are separated by an adjacency character to form a compoundword may be referred to as “components” of the compound word. Forexample, “Austria” and “Hungary” are both components of the compoundword “Austria-Hungary”.

In one embodiment, words that are separated only by a space, a leftparenthesis, a right parenthesis, a left bracket, a right bracket, aleft curly bracket, a right curly bracket, an exclamation point, aquestion mark, a semicolon, a percent sign, a carat, a tilde, anasterisk, a vertical bar (“|”), a pound sign, an equal sign, or a commaare considered to be separate words rather than a single compound word.A character separating such words may be referred to as a “space”character.

In one embodiment, a compound word that occurs in a query (a “compoundquery term”) is treated differently than a compound word that occurs ina digest. Typically, a user who enters a compound query term is notinterested in resources that contain separated components of thecompound query term. Therefore, in one embodiment, a compound query termis treated the same as a single word when finding text strings in adigest. In other words, the compound query term is not considered to befound in the digest unless the digest contains the entire compound queryterm in the same form in which the user entered it.

In one embodiment, components of a compound word that occurs in a digestare treated as separate words when finding text strings in a digest. Forexample, if the compound word “Austria-Hungary” appears in the digest,and the query terms are “Austria” and “Hungary”, then “Austria” and“Hungary” are considered to be separate query terms in the digest.However, in one embodiment, if the compound word consists of one or morecomponents followed by an apostrophe followed by a single alphanumericcharacter, such as in the words “Chad's” and “can't”, then the singlealphanumeric character is not considered to be a separate query term inthe digest.

In one embodiment, a query term is considered to be found in the digestif the query term is contained within a compound word in the digest,even if the compound word in the digest contains one or more componentsin addition to the query term.

Multiple query terms may be enclosed in quotes to form a phrase withinthe quotes (the phrase does not include the quotes themselves). In oneembodiment, a phrase is considered to be found in the digest if thephrase is contained within a compound word in the digest, ignoring anyadjacency characters that are contained in the compound word.

In one embodiment, when a compound word is added to a text string, dueto being or containing a query term, or as a result of extending thetext string to satisfy a minimum word count requirement, all of thecomponents of the compound word are added to the text string. As aresult, no contextual abstract will contain a part of a compound wordwithout the remainder of the compound word.

Matching Words that Contain Special Characters

Some search engines may transform special characters that occur in queryterms or page indices into non-special characters. A search engine maytransform an accented character into a corresponding character in whichthe accent has been removed. In one embodiment, because the digestdescribed above is used to locate query terms and display actual textthat occurs in a page, accented or “special” characters in a digest arenot transformed in this manner. A technique is described below to ensurethat a query term that contains an unaccented character will be found ina digest in which the query term exists but contains the correspondinguntransformed accented character.

Some query terms contain special characters, and other query terms donot. In one embodiment, if a user submits query terms that contain oneor more special characters, then a digest is considered to contain aparticular query term only if the digest contains the particular queryterm as it was submitted. In other words, if at least one specialcharacter occurs within query terms, then non-special characters in adigest are not considered to be the same as special characters in thequery term.

In one embodiment, if user submits query terms that do not contain anyspecial characters, then a digest is considered to contain a particularquery term if the digest contains a word that would be the same as theparticular query term if the special characters in the word weretransformed into their corresponding non-special characters. In otherwords, if no special characters occur within query terms, then thespecial characters in a digest are considered to be the same as thecorresponding non-special characters in the query terms.

Hardware Overview

FIG. 5 is a block diagram that illustrates a computer system 500 uponwhich an embodiment of the invention may be implemented. Computer system500 includes a bus 502 or other communication mechanism forcommunicating information, and a processor 504 coupled with bus 502 forprocessing information. Computer system 500 also includes a main memory506, such as a random access memory (RAM) or other dynamic storagedevice, coupled to bus 502 for storing information and instructions tobe executed by processor 504. Main memory 506 also may be used forstoring temporary variables or other intermediate information duringexecution of instructions to be executed by processor 504. Computersystem 500 further includes a read only memory (ROM) 508 or other staticstorage device coupled to bus 802 for storing static information andinstructions for processor 504. A storage device 510, such as a magneticdisk or optical disk, is provided and coupled to bus 502 for storinginformation and instructions.

Computer system 500 may be coupled via bus 502 to a display 512, such asa cathode ray tube (CRT), for displaying information to a computer user.An input device 514, including alphanumeric and other keys, is coupledto bus 502 for communicating information and command selections toprocessor 504. Another type of user input device is cursor control 516,such as a mouse, a trackball, or cursor direction keys for communicatingdirection information and command selections to processor 504 and forcontrolling cursor movement on display 512. This input device typicallyhas two degrees of freedom in two axes, a first axis (e.g., x) and asecond axis (e.g., y), that allows the device to specify positions in aplane.

The invention is related to the use of computer system 500 forimplementing the techniques described herein. According to oneembodiment of the invention, those techniques are performed by computersystem 500 in response to processor 504 executing one or more sequencesof one or more instructions contained in main memory 506. Suchinstructions may be read into main memory 506 from anothercomputer-readable medium, such as storage device 510. Execution of thesequences of instructions contained in main memory 506 causes processor504 to perform the process steps described herein. In alternativeembodiments, hard-wired circuitry may be used in place of or incombination with software instructions to implement the invention. Thus,embodiments of the invention are not limited to any specific combinationof hardware circuitry and software.

The term “computer-readable medium” as used herein refers to any mediumthat participates in providing instructions to processor 504 forexecution. Such a medium may take many forms, including but not limitedto, non-volatile media, volatile media, and transmission media.Non-volatile media includes, for example, optical or magnetic disks,such as storage device 510. Volatile media includes dynamic memory, suchas main memory 506. Transmission media includes coaxial cables, copperwire and fiber optics, including the wires that comprise bus 502.Transmission media can also take the form of acoustic or light waves,such as those generated during radio-wave and infra-red datacommunications.

Common forms of computer-readable media include, for example, a floppydisk, a flexible disk, hard disk, magnetic tape, or any other magneticmedium, a CD-ROM, any other optical medium, punchcards, papertape, anyother physical medium with patterns of holes, a RAM, a PROM, and EPROM,a FLASH-EPROM, any other memory chip or cartridge, a carrier wave asdescribed hereinafter, or any other medium from which a computer canread.

Various forms of computer readable media may be involved in carrying oneor more sequences of one or more instructions to processor 504 forexecution. For example, the instructions may initially be carried on amagnetic disk of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 500 canreceive the data on the telephone line and use an infrared transmitterto convert the data to an infrared signal. An infrared detector canreceive the data carried in the infrared signal and appropriatecircuitry can place the data on bus 502. Bus 502 carries the data tomain memory 506, from which processor 504 retrieves and executes theinstructions. The instructions received by main memory 506 mayoptionally be stored on storage device 510 either before or afterexecution by processor 504.

Computer system 500 also includes a communication interface 518 coupledto bus 502. Communication interface 518 provides a two-way datacommunication coupling to a network link 520 that is connected to alocal network 522. For example, communication interface 518 may be anintegrated services digital network (ISDN) card or a modem to provide adata communication connection to a corresponding type of telephone line.As another example, communication interface 518 may be a local areanetwork (LAN) card to provide a data communication connection to acompatible LAN. Wireless links may also be implemented. In any suchimplementation, communication interface 518 sends and receiveselectrical, electromagnetic or optical signals that carry digital datastreams representing various types of information.

Network link 520 typically provides data communication through one ormore networks to other data devices. For example, network link 520 mayprovide a connection through local network 522 to a host computer 524 orto data equipment operated by an Internet Service Provider (ISP) 526.ISP 526 in turn provides data communication services through theworldwide packet data communication network now commonly referred to asthe “Internet” 528. Local network 522 and Internet 528 both useelectrical, electromagnetic or optical signals that carry digital datastreams. The signals through the various networks and the signals onnetwork link 520 and through communication interface 518, which carrythe digital data to and from computer system 500, are exemplary forms ofcarrier waves transporting the information.

Computer system 500 can send messages and receive data, includingprogram code, through the network(s), network link 520 and communicationinterface 518. In the Internet example, a server 530 might transmit arequested code for an application program through Internet 528, ISP 526,local network 522 and communication interface 518.

Processor 504 may execute the received code as it is received and/orstored in storage device 510, or other non-volatile storage, for laterexecution. In this manner, computer system 500 may obtain applicationcode in the form of a carrier wave.

In the foregoing specification, embodiments of the invention have beendescribed with reference to numerous specific details that may vary fromimplementation to implementation. Thus, the sole and exclusive indicatorof what is the invention, and is intended by the applicants to be theinvention, is the set of claims that issue from this application, in thespecific form in which such claims issue, including any subsequentcorrection. Any definitions set forth herein for terms contained in suchclaims shall govern the meaning of such terms as used in the claims.Hence, no limitation, element, property, feature, advantage or attributethat is not expressly recited in a claim should limit the scope of suchclaim in any way. The specification and drawings are, accordingly, to beregarded in an illustrative rather than a restrictive sense.

What is claimed is:
 1. A computer system comprising: a memory storing instructions; one or more processors coupled to the memory, wherein the one or more processors execute the instructions, which causes the one or more processors to: identify one or more sections in a document, wherein each section of the one or more sections comprises one or more text strings; identify one or more selectable links in a particular section of the one or more sections in the document; assign a weight to each section of the one or more sections, wherein the weight assigned to the particular section is based, at least in part, on a portion of the particular section that includes the one or more selectable links; generate a summary of the document based, at least in part, on the weight assigned to each section of the one or more sections.
 2. The computer system of claim 1, wherein: the instructions further cause the one or more processors to determine, for the particular section of the one or more sections in the document, a number of characters within the particular section that are not contained in a selectable link; the weight assigned to the particular section is based, at least in part, on the number of characters.
 3. The computer system of claim 1, wherein: the instructions further cause the one or more processors to determine, for the particular section of the one or more sections in the document, a percentage of characters within the particular section that are not contained in a selectable link; the weight assigned to the particular section is based, at least in part, on the percentage of characters.
 4. The computer system of claim 1, wherein the instructions further cause the one or more processors to extract the one or more sections in the document based, at least in part, on one or more specified fields in the document.
 5. The computer system of claim 1, wherein the instructions further cause the one or more processors to: find a plurality of text strings within a document, wherein each text string of the plurality of text strings corresponds to at least one section of one or more sections in the document; associate, for each text string in the plurality of text strings, a score that is based at least in part on the weight that is associated with the section that corresponds to the text string; select one or more text strings, from the plurality of text strings, for generating a summary of the document based, at least in part, on the score associated with each text string of the plurality of text strings; wherein generating the summary of the document is based, at least in part, on the one or more text strings that were selected.
 6. The computer system of claim 5, wherein, for each text string in the plurality of text strings: the instructions further cause the one or more processors to determine a number of words in the text string; and associating the score for the text string is based, at least in part, on the number of words in the text string.
 7. The computer system of claim 5, wherein selecting the one or more text strings, from the plurality of text strings, comprises comparing the score associated with the text string to a particular threshold.
 8. A method comprising: identifying one or more sections in a document, wherein each section of the one or more sections comprises one or more text strings; identifying one or more selectable links in a particular section of the one or more sections in the document; assigning a weight to each section of the one or more sections, wherein the weight assigned to the particular section is based, at least in part, on a portion of the particular section that includes the one or more selectable links; generating a summary of the document based, at least in part, on the weight assigned to each section of the one or more sections; wherein the method is performed by one or more processors.
 9. The method of claim 8 further comprising: determining, for the particular section of the one or more sections in the document, a number of characters within the particular section that are not contained in a selectable link; wherein the weight assigned to the particular section is based, at least in part, on the number of characters.
 10. The method of claim 8 further comprising: determining, for the particular section of the one or more sections in the document, a percentage of characters within the particular section that are not contained in a selectable link; wherein the weight assigned to the particular section is based, at least in part, on the percentage of characters.
 11. The method of claim 8 further comprising extracting the one or more sections in the document based, at least in part, on one or more specified fields in the document.
 12. The method of claim 8 further comprising: finding a plurality of text strings within a document, wherein each text string of the plurality of text strings corresponds to at least one section of one or more sections in the document; associating, for each text string in the plurality of text strings, a score that is based at least in part on the weight that is associated with the section that corresponds to the text string; selecting one or more text strings, from the plurality of text strings, for generating a summary of the document based, at least in part, on the score associated with each text string of the plurality of text strings; wherein generating the summary of the document is based, at least in part, on the one or more text strings that were selected.
 13. The method of claim 12 further comprising, for each text string in the plurality of text strings: determining a number of words in the text string; wherein associating the score for the text string is based, at least in part, on the number of words in the text string.
 14. The method of claim 12, wherein selecting the one or more text strings, from the plurality of text strings, comprises comparing the score associated with the text string to a particular threshold.
 15. A computer system comprising: one or more processors; a memory; a module capable of identifying one or more sections in a document, wherein each section of the one or more sections comprises one or more text strings; a module capable of identifying one or more selectable links in a particular section of the one or more sections in the document; a module capable of assigning a weight to each section of the one or more sections, wherein the weight assigned to the particular section is based, at least in part, on a portion of the particular section that includes the one or more selectable links; a module capable of generating a summary of the document based, at least in part, on the weight assigned to each section of the one or more sections.
 16. The computer system of claim 15 further comprising: a module capable of determining, for the particular section of the one or more sections in the document, a number of characters within the particular section that are not contained in a selectable link; wherein the weight assigned to the particular section is based, at least in part, on the number of characters.
 17. The computer system of claim 15 further comprising: a module capable of determining, for the particular section of the one or more sections in the document, a percentage of characters within the particular section that are not contained in a selectable link; wherein the weight assigned to the particular section is based, at least in part, on the percentage of characters.
 18. The computer system of claim 15 further comprising a module capable of extracting the one or more sections in the document based, at least in part, on one or more specified fields in the document.
 19. The computer system of claim 15 further comprising: a module capable of finding a plurality of text strings within a document, wherein each text string of the plurality of text strings corresponds to at least one section of one or more sections in the document; a module capable of associating, for each text string in the plurality of text strings, a score that is based at least in part on the weight that is associated with the section that corresponds to the text string; a module capable of selecting one or more text strings, from the plurality of text strings, for generating a summary of the document based, at least in part, on the score associated with each text string of the plurality of text strings; wherein generating the summary of the document is based, at least in part, on the one or more text strings that were selected.
 20. The computer system of claim 19 further comprising, for each text string in the plurality of text strings: a module capable of determining a number of words in the text string; wherein associating the score for the text string is based, at least in part, on the number of words in the text string.
 21. The computer system of claim 19, wherein selecting the one or more text strings, from the plurality of text strings, comprises comparing the score associated with the text string to a particular threshold. 